Improved test script

Added reliable method to determine number of facets
Fixed LayerManager error with float comparison