Fixed the remaining errors so far