Added multiple target generation with automatic garbage collection