refactoring: removed weird inheritance
refactoring: split in files per class
improved test-coverage and fixed found bugs