Refactored library by adding event subscribers and separating logic to different clients