Made the class page code a bit better