Managed to finish it in 200 seconds! Nicely done - there's definitely scope for more here if you decide to keep working on it after the jam.