Refactor; Add comments