Bug Fixes and typing error fixes.