reorganize factories and stacks, separate from factory

setup for future changes