[WIP] More type refinement