Added register functionality, basic error checking, and routing. Check the readme.