Started going through and modifying the system to handle exceptions and clean up the code where possible.

Signed-off-by: Alfonso Martinez <corrupted.rogues@gmail.com>