optimizing features, formatting fixes