This is really well designed. It's so much work to prepare your path to the exit, and then there are good optimisations on top of that. It's brilliant that the level was intentionally designed to work like this.
Edit: Ah, unfortunately there are lots of duplicate solutions for the top-right part.