WIP. saving state. Refactor trainandtest func.
fixing several bugs w/ matlabwriter and helpers
MIMIC works properly now
MatlabWriter is much better (no more crazy matrix sizes for no reason)