Fixing class responsibility and variable visibility.