Refine code
small changes