Moved elevator state manipulation to own file.