reorganized, fixed zordering bugs