Initial version - complete and tested