Minor code changes and follow naming convention