refactored the cli layer for the new stack resource
refactored the core layer for the new stack resource