gasoline code refactoring