package refactor to support packaging of gems aswells as apis