Use messages framework instead of handling them manually.
Fix some css styles for text input lengths and submit button margins.
Remove accidentally committed trailing whitespace.
Remove no longer used alerts loop in app_base.html layout.