Cleanup this logic