Core refactor. Removing old API