Cleanup warnings and compile errors