Refactor bucket a tiny bit