Java backend: minor: cleaned up some mess and added some documentation
Java backend: added some documentation