Changes to fix scoring made. Still need to test the functions.