Refactor model inside form.
Move js to assets and more refactoring.