build changes to make "ant debug" work

i've gotten this branch to build as well, with a few changes from below