Restructure java AST classes.