added in my behaviour tree lib and refactored the grouping of layer object, it is much better now