syntax cleanup and better print