Changed interface for types and updated internals