adding test coverage and fixing page render errors