Remove unused methods.
Simplify type marker check.