Getting sync to compile

Remove several compiler warnings in several places