fix for Issue #17 @ksubba
Cell types needed to be defined outside closure