Cleaned up Frequencies js