GUI update; bug fixes in functions
GUI updated; several bugfixes in functions