Thanks to @jkingyens for the bulk of the work. Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>