refactored the javafiles in nice packages