Finished off the syntax errors. Now to track down logic errors