Several little enhancements and fixes

Signed-off-by: Baki Goxhaj <banago@gmail.com>