more code cleaning and useful test & development environment
added tests
finished first tests