FPA API bugfixes

Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>
FPA theory bug fixes.
Also removed unnecessary intermediate variables.

Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>
FPA: reduced number of temporary variables.

Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>