Simplified tests
Some codestyle changes and cleaning