Comstack Refactor; not complete tested