fixed some major issues with java classes