First working version. Does everything it needs to do.