Strips out old behavour and event code