Minor fixes, and adding new features.