Created a separate class for building up render devices and made resource deallocation implicit.