Split form into partials, added controller test

Extract this to a view helper. Please be more explicit with variable naming.