Cleanup
Extract terminal commands into a dedicated helper