Fixed a small memory leak [ci skip].
Moved settings constants in their own headers [ci skip].