working code, some refactoring
refactored kinvey init command