Removed thumbnailType and clutter.
Added debugMode
Added getCode() and small clean-up.