Added submit button and support for spaces in the input box