Code clean up in Director