Restructure java code into packages