Cleaned up bucket event code, fixed #85.