Dot

Rewritten the sparses dot functions to reduce the number of necessary functions.