Cleaned up whitespace function.