fixed pagination, and removed WTForm.