minor refactor of type declarations