DCW codefix merge

Added my codefixes to the original source.