Final

Final code before competition.