implement new xml format and bug fixes --> now working

Really small but important bug fixes in particular when checking is a process is already running or not
Haha did I write this? This is an awesome comment