Tried Continuation Passing Style. Easier than I thought.