Seperate gtb functions a little for more flexible usage