It's nowhere near complete, but it's better than nothing. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>