DW: Code clean up