Final code used during competition.