Initial framer implementation. Not tested and incomplete.