Moved all logic to CoreFramework