Added timer logic and a lose state shell