Fixed critical errors

Fixed typos and errors that prevented the project from being compiled.