Added include files from https://github.com/nooga/rpc8ecc/. Split some common code into core.h