Cleaned up some magic