Refactored component_handler so it's easier to follow whats going on.
Also found a bug with etag cache key.