Did more work on the compile task + refactoring.