more method related fixes. Made some parts of TypeCheckVisitor public to reuse functionality