Improvements all over the place

Committing on the behalf of mkbu95 who is unable to do it himself, he coded it all and sent me the diff. Thanks mkbu95!

Signed-off-by: shennetsind <ind@henn.et>