Add specs and trivial refactoring

Reading through codes, I've notice some against my preference.
It's really my preference, so totally up to you. Please feel free : )

And I've added some specs, it's kind of first cut.
 
Take your time.