Refactor ant build script