Switched using here documents for better code readability