Made it a single program, added memory usage