Fix issue #57

Removes dims, type and na attributes from `cdb()`. Also some minor fixes in the code structure.