It was on @plathrop 's advice that I put the helper functions outside of the main Application.