whitespace and warning cleanup