refactor(library): move class management to library module