removed useless code
basic error checking
fixed encoding (thank you @tgloureiro)
fixed code conventions
added comments
Merge branch 'master' of https://github.com/hauckwill/linconnect-server.git