added unit test for InputField and squashed some bugs