Added basic tests for KPIAdd().
Fixed small DB issues after Unit Tests.