Cleanup code; still broken