Fixed the warning due to variable instance overriding.
Fix some typing issues and added automatic memoization of typing.
Fixed various typing issues and debug.
Cleaning useless files.