More refactoring and set bucket type properties