Updated and fixed some errors