Fixed API and added new features.