Refactor

Major changes