First version. Still needs work but it runs.