Added character api tests.
Reordered some variables.

Fixed incorrect calling of character api fields