Removed debuggery, cleaned up to_bytes.