Frequency map added. Still some bugs.