Got it running

Removed references to D3DX9 utility functions, minor code cleanup.