Fixed some database and HTML stuff