Tidied up compiler warnings