Refactor names/functions. Delete unused libraries.