some compile warnings cleaned.
fixed some warnings & whitespace cleanup.
merged branch FSB130321_new.