First working version. YAY.