More coding on popup layers