Write basic program and tests