Add optimisations for sub and mul
Extract function for writing $nope.js