Fixes #1 and removes a function that wasn't used