Fixed summary update and added more unit tests