Added comparator implementations for sorting method; added saving method, that writes data into .txt file; changed average salary calculation and other improvements