Big refactor..