Small modifications to compile function.  Now requires how to compile, and what to compile.