bugfix release, and rewrote almost the whole thing