LAMBDA-115: move formats to extra file, make mediafile fields NOT_NULL
forms refactoring and cleanup