Deleted uneccesary stuff
Homology function