Coding style adjustments and some codes cleaning.