added taxonomies and cleaned up code