Modularized code for readability,added API.
API documentation will be added in next commit unless a bug is found.
This splits each page into it's own file, and adds a proper API to allow addition of pages and new robot tiers.
(In other words, this fixes a mistake I should have fixed long ago...)