Moved helper functions to the top, added functions for coloured text output
Reworded a few echo statements