Update to alerts and notices to remove whitespace and refactor