Code for my Ludum Dare 26 entry