Could be a bit cleaner, but everything else was fine :)