cleaned up some routing errors and how get_random works