WIP: major rewrite.

Changing parsing to fit Javac API.