Fixed warnings on constructor defines

Also changed class to use struct type_t for structures and type for the
actual typecasted type.