Potentially stable update.

Needs more testing but should be working now.