clean up in gradient files

created functions for analztical and numerical gradient search