organized code and added tests
Merge branch 'master' of github.com:stronglink/avocado