fix renderLayout and update deprecated and outdated code
Merge pull request #1630 from dereuromark/master-cleanup

Master cleanup