Split form into partials, added controller test

Fix indentation of test file.