code cleanup,client-side test code