Moving some Java code around

Signed-off-by: Daniel Borchmann <daniel.borchmann@mailbox.tu-dresden.de>
Cleaning up

Signed-off-by: Daniel Borchmann <daniel.borchmann@mailbox.tu-dresden.de>