Fixed some types to cause fewer warnings when compiling on windows. Templated the SSE2 code for the same reason.