Optimizations for HASWELL

Optimizations for HASWELL and some small modifications