Cleaned up some magic numbers, and fixed the todo file.