This is the most awesome thing I've coded in a while.