Small refactoring and comments added.
Authored by: relaxmike 2008-06-11
Parent: [r142]
Child: [r144]