Add more gc information, clean up the code.