Tidy up build.xml
Remove unused imports
Change code to make checkstyle happy