Make it cleaner and less buggy