Refactor code and rephrase some strings