Fixed some errors and made some changes