Moved $ts3_pref outside of method so it can be used in entire class (future preparations)