Changed lots of things in Ctables.c
Added error checking, reduced the conditional depth of a few functions