starting the refactor to fully encrypted, more focused core with types