several bugfixes and adding settings box