Class cleanup

A bit of clean-up in class-related code.