Restructured DRM code slightly.