Change defs to lets