Added tests and functions to model for lab. Complete