Dummy Proof

Adding in error checking and other ways to dummy proof the codes.