Assorted bug fixes and code cleanup.

Enyo-DCO-1.1-Signed-off-by: Chris Patalano <christopher.patalano@lge.com>