Cleaned up the amicable numbers functions a little