Added death and win layer detection. Atm it just logs to the console