added schema for unit tests
changed functionality of Model::first() and Model::last()