make it possible to do subdirectories in the img directory
don't submit form if smth is wrong in js
big refactoring of the DOM patcher code