restructuring code after deletion of NOAPIStore