Almost finished.
This version is almost complete, but there are still some bugs I'm tracking down.