added correct tags to form, removed legacy code from 'layer' file. added sql mime type to file checks