basic refactoring
Merge pull request #5 from aderyabin/views

basic refactoring