made key functions tail recursive
Merge pull request #22 from hsyed/slick2

made key functions tail recursive