Separation of code

I've moved the actual business logic away from the server, they're completely separate now.

I've used promises in this simply because I can't think of a nice way to not use them here.

If this doesn't prove how awesome promises are I might as well stop trying. 

I've also changed the package name to an npm-compliant package name.