Update for 1.5 with some bug fixes and code cleanup. See README for more
details.