Refactor circle plugin to follow a similar pattern as travis