First pass at getting the thing working