using type to define structs and interfaces.
added docs about composition.