First version close to being released. There are bugs in here that I will work out.