Added some typehints and minor docblock fixes