Nicer input handling in calc moodule