Add message divs in projects
Add styles for message div
Refactor main function to separate functions