Fix leaks on launch (1188 leaks down to 1 leak)

Plug a bunch of leaks.

Before fixes:
Process 5370: 1188 leaks for 28096 total leaked bytes.

After fixes:
Process 5101: 1 leak for 816 total leaked bytes.

Saves about 26kb memory.