added data memory, refactoring

grouping signal declarations by component rather than type
more refactoring I guess