Added comments where needed