organizing the tag structure and add gem support