cleanup. Added ajax loading image and a history page.