Well stage 1 could perhaps be merged but stage 2 is memory demanding and therefore I don't think that would be a good idea.
This could be done the same way as the GIMPS client. Let de user specify the ammount of memory stage 2 can use. If there's not enough memory to run stage 2, just skip it and continue testing the number. The more memory is available, the higher second bound can be used.

It would be even better if daytime and nighttime settings would also be implemented.