Made the discuessed changes to the whichSide function. Also reanamed the
which sidefunction to findClosestSide to more accurately describe the
function. This name will probably be changed.