Code cleanup and addendum to guide z-index fix