Little javascript clean up