First pass at a working system.