reorganize graphics and reduce listings overhead code