Typehinting and improve docblocks