Added first unit tests
Fixed tests with OS X