Adds more thorough unit tests