Move function declarations before calling them. #178