change entitymanager to template slotmap
refactor slotmap with proper variable names
add workqueue class