Fixed bugs, added copyright header, and updated sample data