Retrieving preferences fixed. Ready for implementing painting