application.js refactoring, layout changes, keep parameters after leave the form and other changes.