Feature/mode management

maybe just use a record here with functions?