Send $target to apiHandler callback

Also move one callback to correct section of code

Change-Id: Id6af45d9748915840567a33294d7a9c7568d2e9b