Stuff from gobby adding min-max engine and encoding