Fixed compiling and Java namespacing issues