Dynamic Title Switching

Changed the code to allow dynamic title switching