Bug Fixes and Backend Cleanup