Fixed numerous compiler warnings