Major refactoring

All code should be separated in to small logical parts.

Django allows to do this using apps, inside each app there is smaller parts
liek models, views, etc. This refactoring includes only separation of apps.