Some new code which might be useful in the future.