I had to remove a faulty Search Service Application. When removing the search app I ran into problems and ended up using stsadm.exe -o deleteconfigurationobject -id "GUID" among other commands to remove it from the Service Applications list. Ran psconfig at the end.
Trying to create a new Search Application, without any luck. Tried first from the GUI, and then with powershell.
Looks like there is a problem when creating the webservices in the application pool.