settings functionality, bugfixes