updated comments + small code cleanup