Pulling out core code outside