Refactoring and getting rid of string dependencies