Some changes to get random gradient implemented, still needs work