So much stuff. Mostly Rework on main functions