optimization of some of the libraries
Merge pull request #987 from Bart39/dev

optimization of some of the libraries