Refactored Snake added train controller