Add form validation, fixed some minor issues. TODO form validation when using drag and drop