Organize code better