Refactor stuff to ShadowCore