lot of bug fixes, settings reimplementation and addition