DW: Code cleanup