Settings improvements

Made a class to store them, and persist them between executions by
writing to disk.