code cleanup + small refactoring of packages
splitted huge file into severals
Merge pull request #11 from denigma/master

Some refactoring