Looks like you could clean these up with bijection.