Add missing require
Clean up params encoding