Moved switch logic to logic.txt