This reduces code duplication, but more importantly means that the DRI modules can be found by X enabling hardware acceleration. Close #249; the PR also refers to more about DRI modules.