Exception handling,  modified code.

Also changed name of ColorCodeAssignments.js to colorcode.js