Moved builder enter and leave code to dedicated scripts