clarified design pattern terminology and fixed bugs