Little refactoring and bug fixing

Changes to improve/fix:
- readability
- objects encapsulation
- bugs
- dead code
- verbosity