Reordered functions; changed settings.