Added errorpage
Changed some methods