cleaned up some of the trim upload JS