Refactor pkg and prepare for 0.2