made some static constants private
fixed errors and performance tweak to havannah