Initial commit. Engine separated into two parts, api and core implementation.