More api work and import optimization