Rework the ScriptManager

Signed-off-by: Ian Macalinao <ianmacalinao@gmail.com>