Add core code, a makefile, and a test script