Added more checks (-Wextra), fixed compiler warning