Fix indents and whitespaces
Implement text serialization and populate the hidden input field