Initial commit with serial code and correctness check.