adding common js and preparing unit tests