adding source files and build scripts
adding test sources
adding scripts to build tests, fixing tests