Removed tests because the libraries used are already tested
Converted terms field to local variable and removed unused fields