Fixed (most) compiler warnings