Split code of form.rb into different files