Removed all the java code to work from the outside in