Cleaning main java file