Merged cleanups from Phil Carmody <phil.carmody@partner.samsung.com>