Further work on llvm backend
Added destructive traversals and fixed llvm backend.
Move code into .cpp files.