Oxide 2 - rewritten for better modularity.