Refactored and better modularized the ant scripts