some non-functional modifications

I didn't change anything functional, just fixed some bug and changed a
little