Add type hinting and fix some doc blocks

Change-Id: If772b8ab633f40b2a31e17a7a692644724dce0c1