Major overhaul/refactor 

- Make more use of functional programming
- Remove exec and eval statements
- Use jinja2 templates to create python pipeline scripts
- Update tests
- Remove duplicate code in compile.py
- Add requirements.txt
- Beef up setup.py script
- Fix packaging
- Fix pep8 errors
- ...