Debugging changes

Made just a few changes - still have an error at the very end, not sure
why??