Add support for user-defined codes