Improve session parsing and add 'remove' function support to uninstalling modules