fixed error, when a form with existing nested forms got deleted
refactoring most of the inline forms code.
nested inline forms are now better supported
removed lots of code duplication