Adding error alerts and cleaning up code

* Erase extra space in files
* Re-align code in files
* Add error alerts to forms which didn't have it