Added DM, NL Speed up, Joined linear/non linear functions, few bug fixes