port to Core

Closes #6.