performance and style updates

Signed-off-by: Kulamagal Mahendrarajah <kulamagal@qi-interactive.com>