some polish, got rid of old code