Added rules page. Fixed bugs.