Adds changes so that it will work on a locally-hosted version of cdm

Makes a few changes so that it works with locally hosted versions of CDM. 

I made these changes more and a year ago so don't ask me to explain them. :)