Refactor. Get errors working.