Updated so app works locally with CORS. Cleaned up the code and comments somewhat.
Added fix for bad encoding
Merge pull request #6 from Scorpiion/master

Better port handling with CORS support, added fix for bad encoding