Refactor bucket model

Following my own advice