Improved typing