Fixed codestyle, fixed tests