Some significant refactoring...improved design
Bumped version to 0.3.0 for recent changes