Remove some redundancies
Small cleanups
use base class name in comparisons for better performance