Fixed a number of errors based on review