Minor performance tweaks
Added OpenMP support