Added tests for models. Closes #4