Began tying it together with go function. Refactored some tests.