compare layer work, some button and attribute refactoring