Tidy up compiler warnings