Use class name when inside of a module. Fixes #50