Fixed bugs in frequency output. Improved data persistence leve.