Refactoring to use piecutter.

Need to release piecutter and remove github requirements before merge :)