Added new features and more debug info