More cleaning of code, added some color functions, variable formatting.