Moved state into own namespace