Introduced Builder Engine class and some refactoring