Part #1 - re-factoring

Mehran! This version will not work for you. use the old fx.js for now