Cleaned up randdir function