Classes cleaned up and cat class functions extended