Initial Nimrod rewrite