Cleanup and new code

Signed-off-by: Prashanth Pai <ppai@redhat.com>