removed junk code, updated compound to category mapping algorithm