Package refactor and housekeeping