cleanup, comments, added releaseShape, made naiveStereoLimiter
added mono version