Rename functions & add minor documentation