Bug 1080219 - Added logging, improved comments