Fixed bad SQL query and missing bracket, fixed validation for range
Added reset button to input form