Refactored the controller to actually pass around the id of the invoking
command so the statecontext knows which id did what in case it needs to give
the lock to it.

Implemented it, but didn't test it. Will do that later. It should work though.