added push from server of ls.

also cleaned up some memory leaks.