Removed factories from encoding.