Cleaned up input method a bit; added real version.