Slightly better handling of gui module selection.
Don't hardcode state names - allows for different guis to have different states.