Cleanup and keyboard fix