Deleted unnecessary code
Renamed Treename in POST data to title

for consistency