added tests, improved documentation and renamed classes