Mostly completed prototype implementation