Unit tests and deprecated functions

All deprecated function calls removed. Unit tests for accessor methods of all models completed.