Bug Update

Fixes to bugs, and minor changes.