Improve typing