remove util.bless and merge its functionality into api:apply_types

- the latter is a more generic version of the former
- apply_types is now part of the api class