Improved code comments, and fixed issue where we did not set a resource ID for the root page, fixes #66