Fixed several issues with cbuilder's reader.
Added type checking to cbuilder loader.