Changed gallery classes to be more generic. Issue #49. Issue #58