Various cleanups and bugfixes were applied. Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://github.com/openwrt/openwrt/pull/16215 Signed-off-by: Robert Marko <robimarko@gmail.com>