Added page code and fixed errors