Added libraries, rework