Added new struct for function
Added test case for function
Added init and delete for terms