added baseRouteName variables
added lifecycle callbacks
check if mainGroup.sub_group variable is defined before using