Rewrote tests to be proper unit tests and added model manager tests and get_leaves method