The number one tip I always give is to write down everything you think off when you get off topic and start drifting around. I don't know what's happening neurologically, but it trains you to snap back once your train of focus breaks, it might not work for everyone, but I got pretty good results. It's also helped me with forgetfulness.
I use apple's native note application, but evernote looks about the same or better.
I use apple's native note application, but evernote looks about the same or better.
FYI: it'll take a couple weeks to start working