Big refactor for various components