#781 - clean up compiler warnings, remove dead code