Moved namespace to separate file. Cleaned up accesses to current
preferences.