Remove code causing compilation warning
Enabled pedantic warnings, and corrected warnings that fell out as a result