First cut at implementation.