Use new elm interface to avoid unsafePerformIO

We now retrieve the interfaces within the IO monad here and pass them to pure
functions, including the one for compilation of the program.
Merge pull request #85 from jsl/use_safe_elm_interface

Use new elm interface to avoid unsafePerformIO