Added sanity check for encode, added basic interactions