added features to make some type definitions optional