added header files to library sources
code optimizations through more const, more references and less copies