Organize code slightly