Add support for handling collection.

Signed-off-by: crynobone <crynobone@gmail.com>