Added forward training algorithm + test. Some additional tests.