Do not panic on error, instead return error. camelCaseCaps fixed and other style fixes.