Fixes #147
Base classes hierarchy improved