cleaned up code, added struct docs

cleaned up code, added struct docs
clarified lookfor
Merge pull request #829 from sg-s/master

[matlab] cleaned up code, added struct docs