Randomise Function

Started the randomising/ database writing function. Not quite there
yet. Struggling to get the removal of valid numbers to persist.