Re-checked against the coding conventions and gedare's comments on the ML