Many Bug Fixes and some Documentation