Refactored.
Tidied up the magic constants
Added exception handling in comments
Merge pull request #125 from cs2103aug2014-w15-3J/Logic

Merge Master with Logic