Bug Fixes and General Improvements