Added add_feature method. Simplified code a little.