Starting to rewrite most parts.