Initial commit for first pass. Many, many issues in here :)