clean up magic numbers and unused things