Refactor of frontend.pascal to frontend.java