Added layer switching and adding groups to separate layers