small changes, and added testing for negative sampling layer