Initial commit with working scripts (though need rearranging).