Add compile_file and make tests pass