Cleanup of input module