Refactor base
Merge pull request #227 from njam/issue-227

Refactor base