Fix all known bugs by making update loop actually a loop.
Merge pull request #13 from mbforbes/usgd

Fix all known bugs by making update loop actually a loop.