Add more assertion-style unit tests, and fix various errors. Noticed that order of template parameters to RBM is opposite of what I'd like. Will fix after creating more tests.