Rearange code and add more comments