cleanup and arrangement