Applied all the fixes and suggestions made by reviewers