Added initial role check
Added some documentation
Added switchover functions