removed commented and useless code, refactored global FX