mars refactor