Model = new Class({
    initialize: function(properties, modelObserver) {
        this.properties = properties;
        this.bind(modelObserver);
    },

    get: function(property) {
        return this.properties[property];
    },

    set: function(property, value) {
        this.properties[property] = value;
        this.observer.set(property, value);
        return this;
    },

    each_property: function(fun) {
        $H(this.properties).each(fun);
    },

    update_property: function(property, value) {
        this.properties[property] = value;
        return this;
    },

    bind: function(observer) {
        if (observer) {
            this.observer = observer;
            this.observer.observeModel(this);
        }
        return this;
    }
});