Code refactor. Removed unused methods/imports. Restored proper hide/show IME functionalities.