Tidying up some funky code!