Setting up structure. Some initial refacturing code.