Large refactor and addition of new features in line with 0.3.0