Made various improvements