Change apply method to "parse"
Remove unnecessary java outer class