refactoring, z-index fixes