Refactor package for custom types