Minor refactoring

Signed-off-by: Rahul Trikha <rahul.trikha@gmail.com>