Merging from Jaebin's file: Move components out of DE_TOP. Reorganize code.