Initial commit of working code at version 0.9