Refactor/externalize karyon