refine comments and remove newlines at start and beginning