Making compilation script more robust and removing test code from TrevorTasks