Refactor more stuff