Moved container outside conditional as it's used in both cases. Tidied comments so it's easier to read