useless lines and comments are removed.