fixed deprecated sendfile()
cleaned up form items, and implemented new pattern for saving form objects