Refactor and restructure directory
Some more clean up and refactoring
Moves text.js