Additional fixes & cleanup

Signed-off-by: Ivan Bilych <ivan.bilych@gmail.com>