Streamline and amend multi-grid code