perf fixes for module show, fix rubocop complaints