Some fixes for front-end validation, added ajax query