Clean-up constants and global functions (and extent tests)

+ Split global functions from global constants
+ Load Setup with root file and not with settings file
+ Add test to safeguard from uninitialized global functions
+ Add test to check some of the constants (this is more to ensure
that constants are loaded before any other funtion)

Change-Id: I8b9ea9139c4856f4ee58ed4a8f3d237944a182cd