Refactor beehive