initial classes
Merge pull request #1 from zalun/refactoring_to_classes

initial classes