Changed imports to be only be performed if necessary