General work on models, views and controllers, added some configuration options