Refined code and added comments