Lots of work to add settings functionality