Accountability. Get at least one other person invested in your project somehow and set yourself up where you have to provide some kind of progress report or show progress to another.
This has always been the best way that I've fixed my own discipline and focus issues. Nothing pushes me more than social pressure to show up with a finished product.