Improved scriptcollector.

Added detection for attachedProperties and groupedProperties.