Unit tests
Proper unit tests
Merge pull request #81 from Cinderella-Man/optimizers-fix

Optimizers fix