cleaned up main code
added load, test, pages