Made sure all statics are const

The thread-safety checker was complaining that a static was non-const. Turned out that static was never changing and in fact was only used to initialize another const static. It was possible to remove the static and replace it with a temporary which only is used to initialize the const static.