Reinventing the wheel just for fun, took like 30 minutes, was a good Javascript refresh.