Divided main.js functions into seperate modules
Updated readme