Cleaned code and current max scalign freq will be in a array instead of 4 variabled.