Refactored and created custom function to init tourguide