Changes to modify weight values and modify lookup codes.