solved warnings: removed unused variables and imports, small bugfixes