Solved most compiler warnings