Switched using here documents for better code readability

Using here documents makes outputting large blocks of text easier.

http://www.tldp.org/LDP/abs/html/here-docs.html