Minor code changes and added comments for better understanding