Added more controller flexibility. Closes #6.
Refactored codebase.