Made changes based on pylint recommendations