Rebased patches. Ran init script through shellcheck. Several Makefile cleanups. Signed-off-by: Rosen Penev <rosenp@gmail.com>