Cleanup get_key() function; replace spaces with tabs