Added packages and structured the java classes