removed duplicated error output
reformated all classes to a more regular codestyle