Note: I didn't fix all the connects and there are a few missing things. This compiles, more work is coming.