Fixed some problems with the summary and added tests