Code cleanup, DCF functionality added