Reworked library into one class