Full Refactor

Full Refactor