Refine style to match with original lib code.