Minor bug fixes including bbCode on statistics page and updating the code to bring it into line with schema changes.