Initial version, super ugly and barely functional, but a start.