More fature complete, still needs lots of cleanup.