some test code trying to debug the css rewrite...
removed troubleshooting echos
cleaned up path iterator, added comments