refactorings, reduced compiler warnings