Completed medium 15

Was a little tricky to get right but nothing too complex.