moved param parsing into server loop and out of individual page building methods