Updated bucket related code