new regexp to support space control. reduce indent. (now the lib is not working)
support space control, and reduce some indents. add some comments