Real basic version.

Just works. Can be improved in more ways than one.