Initial crack at implementation.