Refactor bucket model

Following my own advice
This should probably have a class level comment to explain what it is used for.