Making it build. Some reorganization.