Added more testing logic, as well as a bit of html for the testing interface.