Made the title load dynamically and refactored a bit