Remove external config file & autoconfigure socket.io for Heroku & rearrange code

Removes external configuration file due to the switch to environmental variables
Auto-detects Heroku environment and configures socket.io accordingly
Rearranges code a bit