Clean up scope implementation