A few checks and comments added