refactored API, added manges, bootstrap