Few tiny improvements in the code