Rename and refactor a bit