Refactoring bin handling.