Cleaned up code to meet coding standard at surface level