various refactorings. breaks credentials structure and events emitted. must adjust README when merge
updated README