migrate code from berkshelf proper into gem