fixed compile warnings and removed extra whitespaces