Improved typing

Added some improvements