Added more unit tests and documentation figures