Finished CD Functions

They now work perfectly the same as Game Maker, tested thoroughly. The
accuracy of timing in milliseconds is also higher. Please merge.