made closure, and configurable
continued refactor and fixed default tab
Merge pull request #2 from stevehayes/moving-to-closures-and-refactory

made closure, and configurable