I moved the declarations near their definitions.