Add the glance states.
Fix bugs in glance states.
Merge branch 'dev-glance' into develop