Extract plugins 2

Almost whole HTML form code generation was moved into the form factory.