Improve type errors WIP