Modularize commit

Non-working copy
Major refactoring due to ripping out TTS functions into external module