fix some return type & intrinsic typing
introduce Invalid type (Subroutines broken everywhere)