add unit Tests

removed async initialize method
add file tests.js --> nodeunit tests file
create constant for errors messages