many bug fixes, and a couple small features added. see description