fix renderLayout and update deprecated and outdated code