Review and episode tests

Finish test suite, couple of bug fixes. Also clear up some security and dependencies
Do we need this line?