Cleaned code and added comments

Removed a small amount of debug code and added links to API endpoints used in examples.