Cleaned up code. Removed variables not used, added some that are.
Worked towards working Colony code.