Initial (large) commit. Still a lot to be done and cleaned up. :(