Switch to stack-based
Remove lua impl