Fix compile errors, reduce imports