Core code of data structure and basic modules for Bambu