Cleaned up code and added title element.