added comments; few tweaks